﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;
using System.IO;
using System.ComponentModel;
using System.Windows.Forms;
using System.Linq;
using System.Net;
using com.hetaoos.PacMaker.Utils;
using com.hetaoos.PacMaker.Maker;

#region Copyright (C) 2010 Null Studio
/*
 * Author:Null hetaoos@gmail.com
 * Blog: http://blog.hetaoos.com
 * Copyright (C) 2010 Null Studio
 * 
 * 
 * PACMaker is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * PACMaker is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with PACMaker. If not, see <http://www.gnu.org/licenses/>.
 */
#endregion

namespace com.hetaoos.PacMaker.Configurations
{
    /// <summary>
    /// 本地配置文件
    /// </summary>
    [DisplayName("本地配置文件")]
    public class AppConfig : XmlSerializerBase<AppConfig>
    {
        /// <summary>
        /// 遇到错误自动重启
        /// </summary>
        [XmlElement(ElementName = "OnErrorAutoReset")]
        public bool OnErrorAutoReset { get; set; }

        public string SourceUrl { get; set; }

        public List<ProxyItem> ProxyItems { get; set; }

        public bool EnableCustomRules { get; set; }

        public string CustomRules { get; set; }

        public bool EnableOutputEncode { get; set; }

        public bool UseSystemWebProxy{ get; set; }

        public string GwfList { get; set; }

        public AppConfig()
        {

        }
        public override void SetDefault()
        {
            OnErrorAutoReset = true;
            GwfList = "http://www.hetaoos.com/utils/gwflist.php";
        }

    }
}
